package com.tang.Dao;
import com.tang.pojo.User;

public class UserDao extends BaseDao {
    public User queryByName(String name){
        User user=queryforOne(User.class,"select * from t_user where name=?;",name);
        return user;
    }
    public User queryByNameAndPasswd(String name,String passwd){
        User user=queryforOne(User.class,"select * from t_user where name=? and password=?;",name,passwd);
        return user;
    }
    public void insertUser(User user){
        update("insert into t_user(name,password,email) values(?,?,?);",user.getName(),user.getPassword(),user.getEmail());
    }
}
